package com.gxa.meiye.admin.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxa.meiye.admin.mapper.ProjectMapper;
import com.gxa.meiye.admin.service.ProjectService;
import com.gxa.meiye.core.pojo.entity.Projects;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author chen
 * @date 2022/7/19 10:12
 */
@Service
public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Projects> implements ProjectService {

    @Resource
    private ProjectMapper projectMapper;
    @Override
    public Integer addPro(Projects project) {
        return this.projectMapper.addPro(project);
    }

    @Override
    public Boolean updatePro(Projects project) {
        Integer integer = this.projectMapper.updatePro(project);
        if (integer == 0){
            return false;
        }
        return true;
    }

    @Override
    public List<Projects> queryPro(Integer id) {
        return this.projectMapper.listProject(id);
    }

    @Override
    public Integer stopPro(Integer id) {
        return this.projectMapper.stopPro(id);
    }

}
